﻿Public Class PacketHandler

    Public handler As Handler

    Public Sub New(ByVal handler As Handler)
        Me.handler = handler
    End Sub

    Public Sub handlePacket(ByVal buf() As Byte, ByVal index As Integer, ByVal len As Integer)
        Dim header As Integer = buf(index)
        Select Case header
            Case Else
                log.log(LogType.MSG_RECV)
                For i As Integer = 0 To len - 1 Step i + 1
                    Console.Write("{0:x2} ", buf(i + index))
                Next
                Console.WriteLine()
                Exit Select
        End Select
    End Sub

End Class
